<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
use App\Models\Admin\SysUser;

class SysUserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $data = [
            [
                'username' => 'spf',
                'department_id' => 3,
                'password' => Hash::make('1qazxsw2'),
                'gender' => 1,
                'nickname' => 'spf_roc',
                'name' => '孙鹏飞',
                'email' => 'sunpengfei@yizhichan.co',
                'mobile' => '15269107030',
                'status' => 1,
            ],
            [
                'username' => 'hky',
                'department_id' => 2,
                'password' => Hash::make('123456'),
                'gender' => 1,
                'nickname' => 'hky',
                'name' => '郝凯衍',
                'email' => 'haokaiyan@yizhichan.co',
                'mobile' => '15269107031',
                'status' => 1,
            ],
        ];

        foreach($data as $user) {
            SysUser::create($user);
        }
    }
}
